﻿Imports VN.INS.DL.DALC
Imports VN.INS.BL.BE
Public Class ReprogramarPoaBC
    Public Function Lista_Monitoreador(ByVal strCodPPER As String) As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.Lista_Monitoreador(strCodPPER)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function lista_ejecutor() As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.lista_ejecutor()
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function lista_ambito() As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.lista_ambito()
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function tipo_cambio() As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.tipo_cambio()
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function lista_especialista() As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.lista_especialista()
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function Lista_Unidades() As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.Lista_Unidades()
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function lista_departamento() As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.lista_departamento()
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function lista_provincia(ByVal DP As String) As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.lista_provincia(DP)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function lista_distrito(ByVal DST As String, ByVal DP As String) As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.lista_distrito(DST, DP)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function lista_producto(ByVal ppr As String) As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.lista_producto(ppr)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function cargarGrilla() As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim objDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            objDt = ObjMantenimientoPoaDA.cargarGrilla()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Sub insertar_poa(ByVal tipCamb As String, ByVal ejec As String, ByVal doc As String, ByVal VERS As Integer, ByVal POA1 As String, ByVal nomb As String, ByVal obj As String, ByVal mt1 As String, ByVal umt1 As String,
                          ByVal mt2 As String, ByVal umt2 As String, ByVal mt3 As String, ByVal umt3 As String,
                          ByVal monto As Decimal, ByVal montoaño As Decimal, ByVal añofirm As String, ByVal monitoreador As String,
                    ByVal espec As String, ByVal mesfirm As String, ByVal dpto As String, ByVal tipodoc As String,
                    ByVal snip As String, ByVal fviabilidad As String, ByVal convenio As String, ByVal ambit As String,
                    ByVal estado As String, ByVal pper As String, ByVal produc As String, ByVal VER As String, ByVal MontTrans As Decimal, ByRef TipoAsig As String, ByVal TipoProyDes As String, ByVal COOX As String, ByVal COOY As String, ByVal OBS As String)

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.insertar_poa(tipCamb, ejec, doc, VERS, POA1, nomb, obj, mt1, umt1, mt2, umt2, mt3, umt3, monto, montoaño, añofirm, monitoreador,
                     espec, mesfirm, dpto, tipodoc, snip, fviabilidad, convenio, ambit,
                     estado, pper, produc, VER, MontTrans, TipoAsig, TipoProyDes, COOX, COOY, OBS)

        Catch ex As Exception
            Throw ex
        End Try

    End Sub
    Public Sub insertar_poa_ht(ByVal tipCamb As String, ByVal ejec As String, ByVal doc As String, ByVal VERS As Integer, ByVal POA1 As String, ByVal nomb As String, ByVal obj As String, ByVal mt1 As String, ByVal umt1 As String,
                         ByVal mt2 As String, ByVal umt2 As String, ByVal mt3 As String, ByVal umt3 As String,
                         ByVal monto As String, ByVal montoaño As String, ByVal añofirm As String, ByVal monitoreador As String,
                   ByVal espec As String, ByVal mesfirm As String, ByVal dpto As String, ByVal tipodoc As String,
                   ByVal snip As String, ByVal fviabilidad As String, ByVal convenio As String, ByVal ambit As String,
                   ByVal estado As String, ByVal pper As String, ByVal produc As String, ByVal MontTrans As Decimal, ByRef TipoAsig As String, ByVal TipoProyDes As String)

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.insertar_poa_ht(tipCamb, ejec, doc, VERS, POA1, nomb, obj, mt1, umt1, mt2, umt2, mt3, umt3, monto, montoaño, añofirm, monitoreador,
                     espec, mesfirm, dpto, tipodoc, snip, fviabilidad, convenio, ambit,
                     estado, pper, produc, MontTrans, TipoAsig, TipoProyDes)

        Catch ex As Exception
            Throw ex
        End Try

    End Sub
    Public Sub insertar_componente(ByVal poa As String, ByVal comp As String, ByVal Descripcion As String, ByVal version As String, ByVal comph As Integer, ByVal pesocom As Integer)
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.insertar_componente(poa, comp, Descripcion, version, comph, pesocom)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub editar_poa_principal(ByVal tipCamb As String, ByVal ejec As String, ByVal doc As String, ByVal VERS As Integer, ByVal POA1 As String, ByVal nomb As String, ByVal obj As String, ByVal mt1 As String, ByVal umt1 As String,
                         ByVal mt2 As String, ByVal umt2 As String, ByVal mt3 As String, ByVal umt3 As String,
                         ByVal monto As Decimal, ByVal montoaño As Decimal, ByVal añofirm As String, ByVal monitoreador As String,
                   ByVal espec As String, ByVal mesfirm As String, ByVal dpto As String, ByVal tipodoc As String,
                   ByVal snip As String, ByVal fviabilidad As String, ByVal convenio As String, ByVal ambit As String,
                   ByVal estado As String, ByVal pper As String, ByVal produc As String, ByVal MontTrans As Decimal, ByRef TipoAsig As String, ByVal TipoProyDes As String)

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.editar_poa_principal(tipCamb, ejec, doc, VERS, POA1, nomb, obj, mt1, umt1, mt2, umt2, mt3, umt3, monto, montoaño, añofirm, monitoreador,
                     espec, mesfirm, dpto, tipodoc, snip, fviabilidad, convenio, ambit,
                     estado, pper, produc, MontTrans, TipoAsig, TipoProyDes)

        Catch ex As Exception
            Throw ex
        End Try

    End Sub
    Public Sub editar_poa_componente(ByVal poa As String, ByVal comp As String, ByVal Descripcion As String, ByVal version As String, ByVal compoh As String, ByVal acom As String, ByVal pesocomp As Integer)
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.editar_poa_componente(poa, comp, Descripcion, version, compoh, acom, pesocomp)
        Catch ex As Exception
            Throw ex
        End Try

    End Sub
    Public Sub editar_poa_componente_ht(ByVal poa As String, ByVal comp As String, ByVal Descripcion As String, ByVal version As String, ByVal compoh As String)
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.editar_poa_componente_ht(poa, comp, Descripcion, version, compoh)
        Catch ex As Exception
            Throw ex
        End Try

    End Sub

    Public Sub editar_poa_financiero(ByVal GENE As String, ByVal ESPEC As String, ByVal version As Integer, ByVal IDPFN As String,
                                         ByVal MT1 As String, ByVal MT2 As String, ByVal MT3 As String, ByVal MT4 As String, ByVal MT5 As String, ByVal MT6 As String,
                                         ByVal MT7 As String, ByVal MT8 As String, ByVal MT9 As String, ByVal MT10 As String, ByVal MT11 As String, ByVal MT12 As String,
                                         ByVal MTAF As String, ByVal POAX As String, ByVal IDFNH As String)
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.editar_poa_financiero(GENE, ESPEC, version, IDPFN, MT1, MT2, MT3, MT4,
                                                        MT5, MT6, MT7, MT8, MT9, MT10, MT11, MT12, MTAF, POAX, IDFNH)
        Catch ex As Exception
            Throw ex
        End Try

    End Sub
    Public Sub editar_poa_fisico(ByVal comp As String, ByVal Descripcion As String, ByVal version As String, ByVal unidad As String, ByVal IDPF As String,
                                        ByVal MT1 As String, ByVal MT2 As String, ByVal MT3 As String, ByVal MT4 As String, ByVal MT5 As String, ByVal MT6 As String,
                                        ByVal MT7 As String, ByVal MT8 As String, ByVal MT9 As String, ByVal MT10 As String, ByVal MT11 As String, ByVal MT12 As String,
                                        ByVal MTA As String, ByVal fisht As String, ByVal POAX As String, ByVal IDFH As String, ByVal IDPC As String, ByVal COD As String)
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.editar_poa_fisico(comp, Descripcion, version, unidad, IDPF, MT1, MT2, MT3, MT4, MT5, MT6, MT7,
                                                    MT8, MT9, MT10, MT11, MT12, MTA, fisht, POAX, IDFH, IDPC, COD)
        Catch ex As Exception
            Throw ex
        End Try

    End Sub
    Public Function ListaPOA() As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim objDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            objDt = ObjMantenimientoPoaDA.ListaPOA()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function ListaPOA(ByVal strNombre As String, ByVal strTipo As String)
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim objDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            objDt = ObjMantenimientoPoaDA.ListaPOA(strNombre, strTipo)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function CargarGrillaHistory(ByVal poa As String) As DataTable

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim objDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            objDt = ObjMantenimientoPoaDA.CargarGrillaHistory(poa)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function CargarGrillaComponente(ByVal poa As String, ByVal verch As String) As DataTable

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim objDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            objDt = ObjMantenimientoPoaDA.CargarGrillaComponente(poa, verch)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function CargarGrillafisico(ByVal poa As String, ByVal vers As String) As DataTable

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim objDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            objDt = ObjMantenimientoPoaDA.CargarGrillafisico(poa, vers)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function CargarGrillafinanciero(ByVal poa As String, ByVal vers As String) As DataTable

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim objDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            objDt = ObjMantenimientoPoaDA.CargarGrillafinanciero(poa, vers)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function modific_poaPrinc(ByVal poa As String, ByVal VERSH As String) As DataTable

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim objDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            objDt = ObjMantenimientoPoaDA.modific_poaPrinc(poa, VERSH)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function LISTA_COMPONENTE(ByVal poac As String) As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.LISTA_COMPONENTE(poac)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function LISTA_COMPONENTE(ByVal poac As String, ByVal VERS As String) As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.LISTA_COMPONENTE(poac, VERS)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Sub insertar_actividad_fisica(ByVal poa As String, ByVal comp As String, ByVal Descripcion As String, ByVal version As String, ByVal unidad As String, ByVal IDPF As String,
                                        ByVal MT1 As String, ByVal MT2 As String, ByVal MT3 As String, ByVal MT4 As String, ByVal MT5 As String, ByVal MT6 As String,
                                        ByVal MT7 As String, ByVal MT8 As String, ByVal MT9 As String, ByVal MT10 As String, ByVal MT11 As String, ByVal MT12 As String,
                                        ByVal MTA As Integer, ByVal IDFH As Integer, ByVal IDPC As Integer, ByVal verfis As String, ByVal PESO As String, ByVal COD As String)

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.insertar_actividad_fisica(poa, comp, Descripcion, version, unidad, IDPF,
                                         MT1, MT2, MT3, MT4, MT5, MT6, MT7, MT8, MT9, MT10, MT11, MT12, MTA, IDFH, IDPC, verfis, PESO, COD)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public Sub delete_update_finan(ByVal poa As String, ByVal idfin As Integer, ByVal ver As String)

        Dim delete_update_finan As ReprogramarPoaDA
        Try
            delete_update_finan = New ReprogramarPoaDA
            delete_update_finan.delete_update_finan(poa, idfin, ver)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub delete_update_fis(ByVal poa As String, ByVal idfis As Integer, ByVal ver As String)
        Dim objdelete_update_fis As ReprogramarPoaDA

        Try
            objdelete_update_fis = New ReprogramarPoaDA
            objdelete_update_fis.delete_update_fis(poa, idfis, ver)

        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub delete_update_comp(ByVal poa As String, ByVal comp As Integer, ByVal ver As String)

        Dim delete_update_comp As ReprogramarPoaDA
        Try
            delete_update_comp = New ReprogramarPoaDA
            delete_update_comp.delete_update_comp(poa, comp, ver)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub insertar_actividad_fisicaht(ByVal poa As String, ByVal comp As String, ByVal Descripcion As String, ByVal version As String, ByVal unidad As String, ByVal IDPF As String,
                                    ByVal MT1 As String, ByVal MT2 As String, ByVal MT3 As String, ByVal MT4 As String, ByVal MT5 As String, ByVal MT6 As String,
                                    ByVal MT7 As String, ByVal MT8 As String, ByVal MT9 As String, ByVal MT10 As String, ByVal MT11 As String, ByVal MT12 As String,
                                    ByVal MTA As String, ByVal IDFH As Integer, ByVal IDPC As Integer, ByVal Afis As String, ByVal PESO As Integer)

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.insertar_actividad_fisicHT(poa, comp, Descripcion, version, unidad, IDPF,
                                         MT1, MT2, MT3, MT4, MT5, MT6, MT7, MT8, MT9, MT10, MT11, MT12, MTA, IDFH, IDPC, Afis, PESO)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub insertar_actividad_fisicHT_BR(ByVal poa As String, ByVal comp As String, ByVal Descripcion As String, ByVal version As String, ByVal unidad As String, ByVal IDPF As String,
                                 ByVal MT1 As String, ByVal MT2 As String, ByVal MT3 As String, ByVal MT4 As String, ByVal MT5 As String, ByVal MT6 As String,
                                 ByVal MT7 As String, ByVal MT8 As String, ByVal MT9 As String, ByVal MT10 As String, ByVal MT11 As String, ByVal MT12 As String,
                                 ByVal MTA As String, ByVal IDFH As Integer, ByVal IDPC As Integer)

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.insertar_actividad_fisicHT_BR(poa, comp, Descripcion, version, unidad, IDPF,
                                         MT1, MT2, MT3, MT4, MT5, MT6, MT7, MT8, MT9, MT10, MT11, MT12, MTA, IDFH, IDPC)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public Sub insertar_actividad_financiera(ByVal poa As String, ByVal GENE As String, ByVal ESPEC As String, ByVal version As String, ByVal IDPFN As String,
                                         ByVal MT1 As String, ByVal MT2 As String, ByVal MT3 As String, ByVal MT4 As String, ByVal MT5 As String, ByVal MT6 As String,
                                         ByVal MT7 As String, ByVal MT8 As String, ByVal MT9 As String, ByVal MT10 As String, ByVal MT11 As String, ByVal MT12 As String,
                                         ByVal MTAF As String, ByVal IDFNH As Integer)

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.insertar_actividad_financiera(poa, GENE, ESPEC, version, IDPFN,
                                          MT1, MT2, MT3, MT4, MT5, MT6, MT7, MT8, MT9, MT10, MT11, MT12,
                                          MTAF, IDFNH)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub insertar_actividad_financieraHT(ByVal poa As String, ByVal GENE As String, ByVal ESPEC As String, ByVal version As String, ByVal IDPFN As String,
                                        ByVal MT1 As String, ByVal MT2 As String, ByVal MT3 As String, ByVal MT4 As String, ByVal MT5 As String, ByVal MT6 As String,
                                        ByVal MT7 As String, ByVal MT8 As String, ByVal MT9 As String, ByVal MT10 As String, ByVal MT11 As String, ByVal MT12 As String,
                                        ByVal MTAF As Decimal, ByVal IDFNH As String, ByVal Afin As String)

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.insertar_actividad_financieraHT(poa, GENE, ESPEC, version, IDPFN,
                                          MT1, MT2, MT3, MT4, MT5, MT6, MT7, MT8, MT9, MT10, MT11, MT12,
                                          MTAF, IDFNH, Afin)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub BORRADOR_actividad_financieraHT(ByVal poa As String, ByVal GENE As String, ByVal ESPEC As String, ByVal version As String, ByVal IDPFN As String,
                                     ByVal MT1 As String, ByVal MT2 As String, ByVal MT3 As String, ByVal MT4 As String, ByVal MT5 As String, ByVal MT6 As String,
                                     ByVal MT7 As String, ByVal MT8 As String, ByVal MT9 As String, ByVal MT10 As String, ByVal MT11 As String, ByVal MT12 As String,
                                     ByVal MTAF As Decimal, ByVal IDFNH As Integer)

        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjMantenimientoPoaDA.BORRADOR_actividad_financieraHT(poa, GENE, ESPEC, version, IDPFN,
                                          MT1, MT2, MT3, MT4, MT5, MT6, MT7, MT8, MT9, MT10, MT11, MT12,
                                          MTAF, IDFNH)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Function Listaidcompohistory(ByVal compoH As String) As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim objDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            objDt = ObjMantenimientoPoaDA.Listaidcompohistory(compoH)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function


    Public Function lista_GENERICA() As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim objDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            objDt = ObjMantenimientoPoaDA.lista_GENERICA
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function lista_ESPECIFICA(ByVal generica As String) As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim objDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            objDt = ObjMantenimientoPoaDA.lista_ESPECIFICA(generica)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function consult_existencia(ByVal comp As String, ByVal POA As String, ByVal VERSION As String) As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.consult_existencia(comp, POA, VERSION)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function consult_existencia_fisico(ByVal idfis As String) As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.consult_existencia_fisico(idfis)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function consult_existencia_financiera(ByVal idfin As String) As DataTable
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim ObjDt As DataTable

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            ObjDt = ObjMantenimientoPoaDA.consult_existencia_financiera(idfin)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function consult_version(ByVal poa As String) As Integer
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim vers As Integer

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            vers = ObjMantenimientoPoaDA.consult_version(poa)
            Return vers
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function consult_version_FIS(ByVal poa As String) As Integer
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim vers As Integer

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            vers = ObjMantenimientoPoaDA.consult_version_FIS(poa)
            Return vers
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function consult_version_FIN(ByVal poa As String) As Integer
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim vers As Integer

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            vers = ObjMantenimientoPoaDA.consult_version_FIN(poa)
            Return vers
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function consult_version_comp(ByVal poa As String) As Integer
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim vers As Integer

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            vers = ObjMantenimientoPoaDA.consult_version_comp(poa)
            Return vers
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function consult_exist_comp(ByVal comp As String) As String
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim vers As String

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            vers = ObjMantenimientoPoaDA.consult_exist_comp(comp)
            Return vers
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function consult_exist_fis(ByVal idfis As String) As String
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim vers As String

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            vers = ObjMantenimientoPoaDA.consult_exist_fis(idfis)
            Return vers
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function consult_exist_fin(ByVal idfin As String) As String
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim vers As String

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            vers = ObjMantenimientoPoaDA.consult_exist_fin(idfin)
            Return vers
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function VER_BORRADOR(ByVal poa As String) As String
        Dim ObjMantenimientoPoaDA As ReprogramarPoaDA
        Dim vers As String

        Try
            ObjMantenimientoPoaDA = New ReprogramarPoaDA
            vers = ObjMantenimientoPoaDA.VER_BORRADOR(poa)
            Return vers
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function Consulta_Existencia_Hijos_Metas_Fisicas(ByVal POA As String, ByVal VERSION As String, ByVal ID_FIS As String) As DataTable
        Dim objReporteDA As ReprogramarPoaDA
        Dim objDt As DataTable
        Try
            objReporteDA = New ReprogramarPoaDA
            objDt = objReporteDA.Consulta_Existencia_Hijos_Metas_Fisicas(POA, VERSION, ID_FIS)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function Consulta_Existencia_Hijos_Metas_Financieras(ByVal POA As String, ByVal VERSION As String, ByVal ID_FIN As String) As DataTable
        Dim objReporteDA As ReprogramarPoaDA
        Dim objDt As DataTable
        Try
            objReporteDA = New ReprogramarPoaDA
            objDt = objReporteDA.Consulta_Existencia_Hijos_Metas_Financieras(POA, VERSION, ID_FIN)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

End Class
